These are the differences between the two types of instantiation:
a) Global instantiation: CFM allocates a single copy of the library's static data, regardless of how many clients use the data.
b) Per-context instantiation: CFM allocates one copy of the static data for each separate process that uses that data.
If you want the CFM to allocate only a single copy of your library's static data, and if you are using PPCLink 1.2a1 from ETO 16, your link line must include the option (-share global), which sets the sharing mode for the static data to global instantiation. If you are using version 1.0 of the PPCLink tool, you must specify the global instantiation option (-s 4) on your MakePef command line. For MakePef, the default option is per-context (-s 1).
To learn more about how the Code Fragment Manager deals with global data by
reading pages 1-50 through 1-52 of Inside Macintosh:PowerPC System
Software. "Building for PowerPC" on ETO 16 has additional information on
building a shared library.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help